package org.jpos.fsd2classes;

public final class ClassBuilder {

    public static String buildClassFromFSD(String fsdFilePath) {

        StringBuilder sb = new StringBuilder();

        return sb.toString();
    }

    public static String getBaseMethodName(String fieldName) {

        String ret = convertToCamelCase(fieldName);

        if (fieldName.indexOf("-") > -1) {

            StringBuilder sb = new StringBuilder();

            for(String part : ret.split("-")) {

                sb.append(convertToCamelCase(part));
            }

            ret = sb.toString();
        }

        return ret;
    }

    private static String convertToCamelCase(String value) {

        return value.substring(0, 1).toUpperCase() + value.substring(1);
    }
}
